/* style.css */
/* 基础样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', sans-serif;
}

/* 主背景设置 */
body {
  background: 
    linear-gradient(rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.92)),
    url('../images/weather-bg-blur.jpg') no-repeat center center fixed;
  background-size: cover;
  color: #2c3e50;
  min-height: 100vh;
  line-height: 1.6;
}

/* 头部样式优化 */
header {
  background-color: rgba(44, 62, 80, 0.95);
  color: white;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
  position: relative;
  z-index: 100;
}

header h1 {
  margin: 0;
  font-size: 1.8rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

nav a, nav span {
  color: white;
  text-decoration: none;
  font-size: 1rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

nav a:hover {
  color: #3498db;
  text-decoration: none;
}

/* 主容器样式 */
.container {
  max-width: 1400px;
  margin: 2rem auto;
  padding: 0 2rem;
}

/* 登录注册页面样式 */
.auth-container {
  max-width: 400px;
  margin: 4rem auto;
  padding: 2.5rem;
  background-color: rgba(255, 255, 255, 0.98);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.auth-container h2 {
  margin-bottom: 1.5rem;
  color: #2c3e50;
  font-weight: 600;
}

.auth-container .form-group {
  margin-bottom: 1.5rem;
  text-align: left;
}

.auth-container label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #34495e;
}

.auth-container input,
.auth-container select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid #dfe6e9;
  border-radius: 8px;
  transition: all 0.3s ease;
  background-color: #f8f9fa;
}

.auth-container input:focus,
.auth-container select:focus {
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
  outline: none;
}

.auth-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

.auth-link {
  margin-top: 1.5rem;
  color: #7f8c8d;
}

.auth-link a {
  color: #3498db;
  text-decoration: none;
  font-weight: 500;
}

.auth-link a:hover {
  text-decoration: underline;
}

/* 控制面板布局 */
.dashboard {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 2rem;
}

.dashboard-sidebar {
  background-color: rgba(255, 255, 255, 0.98);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.dashboard-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eee;
  color: #2c3e50;
}

.dashboard-menu {
  list-style: none;
}

.dashboard-menu li {
  margin-bottom: 0.5rem;
}

.dashboard-menu a {
  display: block;
  padding: 0.75rem 1rem;
  color: #34495e;
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.3s ease;
  font-weight: 500;
}

.dashboard-menu a:hover,
.dashboard-menu a.active {
  background-color: #f1f5f9;
  color: #3498db;
}

.dashboard-menu a i {
  margin-right: 0.75rem;
  width: 20px;
  text-align: center;
}

.dashboard-content {
  background-color: rgba(255, 255, 255, 0.98);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: #2c3e50;
}

/* 卡片式设计 */
.info-box {
  background-color: white;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.03);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

/* 按钮样式增强 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  user-select: none;
  border: none;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 8px;
  transition: all 0.3s ease;
  color: white;
  background-color: #3498db;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn i {
  font-size: 0.9em;
}

.btn:hover {
  background-color: #2980b9;
  transform: translateY(-2px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
}

.btn-outline {
  background-color: transparent;
  border: 1px solid #3498db;
  color: #3498db;
}

.btn-outline:hover {
  background-color: #f8f9fa;
}

/* 表单元素美化 */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #34495e;
}

.form-group input,
.form-group select,
.form-group textarea {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  line-height: 1.5;
  color: #495057;
  background-color: white;
  background-clip: padding-box;
  border: 1px solid #dfe6e9;
  border-radius: 8px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
  outline: none;
}

/* 警告信息样式 */
.warning-item {
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  border-left: 4px solid #f39c12;
  border-radius: 8px;
  background-color: white;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.warning-item:hover {
  transform: translateX(5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.warning-item h4 {
  color: #e74c3c;
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

.warning-severe {
  border-left-color: #dc3545;
  background-color: #fff5f5;
}

.warning-list {
  list-style-type: none;
  padding: 0;
}

.warning-list li {
  margin-bottom: 1rem;
}

/* 状态颜色 */
.status-success {
  color: #27ae60;
}

.status-error {
  color: #e74c3c;
}

.status-warning {
  color: #f39c12;
}

/* 天气卡片样式 */
.weather-card {
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.1), rgba(155, 89, 182, 0.1));
  border-radius: 12px;
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  border: 1px solid #e0e6ff;
}

/* 响应式设计优化 */
@media (max-width: 992px) {
  .dashboard {
    grid-template-columns: 1fr;
  }
  
  .dashboard-sidebar {
    margin-bottom: 2rem;
  }
}

@media (max-width: 768px) {
  header {
    flex-direction: column;
    text-align: center;
    padding: 1rem;
  }
  
  nav {
    margin-top: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
  
  .auth-container {
    padding: 1.5rem;
    margin: 2rem auto;
  }
}

/* 动画效果 */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.info-box, .warning-item {
  animation: fadeIn 0.5s ease-out forwards;
}

/* 添加或修改警报样式 */
.alert-box {
    background: #fff8e6;
    border-left: 4px solid #ffcc00;
    padding: 1rem;
    margin-bottom: 1.5rem;
    animation: fadeIn 0.5s;
    display: none;
}

.alert-emergency {
    border-left-color: #ff3333;
    background: #ffebee;
}

.alert-header {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.close-alert {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
}

.new-style {
    max-width: 340px;
    margin: 0 auto;
    padding: 2rem 0;
    text-align: center;
}

.auth-header {
    margin-bottom: 2rem;
}

.auth-header h1 {
    font-size: 24px;
    font-weight: 300;
    letter-spacing: -0.5px;
    color: #24292e;
}

.logo-icon {
    font-size: 48px;
    color: #0366d6;
    margin-bottom: 1rem;
}

.auth-box {
    padding: 20px;
    background-color: #fff;
    border: 1px solid #d8dee2;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
    margin-bottom: 1rem;
}

.btn-primary {
    background-color: #3498db;
    border-color: #3498db;
}

.btn-primary:hover {
    background-color: #3498db;
    border-color: #3498db;
}

.btn-outline {
    color: #24292e;
    background-color: #fafbfc;
    border: 1px solid #d1d5da;
}

.btn-outline:hover {
    background-color: #f3f4f6;
    border-color: #d1d5da;
}

.auth-footer {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eaecef;
    font-size: 12px;
    color: #586069;
}

.auth-footer p {
    margin: 0.5rem 0;
}